<?php


class AtomEntryBean extends Databean {
    
    //protected $base_url;

    // required ements

    /**
     * @var string
     */
    public $id;
    protected function _id_required() {
        return true;
    }
    public function _id_autoValue() {
        return uniqid();
    }

    /**
     * @var string
     */
    public $title;
    protected function _title_required() {
        return true;
    }
    public function _title_autoValue() {
        return 'Please set a title';
    }

    /**
     * @var DateTimeBean
     */
    public $updated;
    protected function _updated_required() {
        return true;
    }
    protected function _updated_inputFilter($x) {
        return $this->_toDateTimeBean($x);
    }
    protected function _updated_autoValue() {
        return new dateTimeBean();
    }

    // recommended elements

    /**
     * @var
     */
    public $author;

    /**
     * @var string xhtml
     */
    public $content;

    public $link;

    public $summary;

    // optional elements

    public $category;

    public $contributor;

    /**
     * @var DateTimeBean publication date
     */
    public $published;
        protected function _published_inputFilter($x) {
        return $this->_toDateTimeBean($x);
    }

    public $source;

    public $rights;

    public $lang='fr';

    	/**
	* value to datetimebean
	* @param mixed $value
	* @access private
	* @return datetimebean
	*/
	function & _toDateTimeBean($value) {
		if (class_exists('datetimebean') and !is_null($value) and $value)
			$value=&new datetimebean($value);
		return $value;
	}/**/
}
